package com.gglx
{
	import com.gglx.app.clip.dto.LocalData;
	
	import flash.utils.Dictionary;
	
	import mx.collections.ArrayCollection;
	
	import spark.components.ViewNavigator;
	import spark.core.ContentCache;

	public class GlobalRegister
	{
		private static var inited:Boolean=false;

		public static var NAVIGATOR:ViewNavigator;

		/**
		 * Danh sách cat
		 */
		public static var CATEGORIES_DV:ArrayCollection;

		/**
		 * Số trang hiện tại của cat
		 * CATEGORIES_PAGE[CAT ID] = CURRENT CAT PAGE
		 */
		public static var CATEGORIES_PAGE:Dictionary;

		/**
		 * Danh sách entries
		 */
		public static var ENTRIES_DV:ArrayCollection;
		
		/**
		 * Danh sách recommend entries
		 */ 
		public static var RECOMMEND_DV:ArrayCollection;

		/**
		 * entry được xem hiện tại
		 */
		public static var CURRENT_ENTRY:Object=null;

		/**
		 * bộ đệm lưu ảnh của ứng dụng
		 */
		public static var IMAGE_CACHED:ContentCache;
		public static var FULL_SCREEN_WIDTH:Number;
		public static var FULL_SCREEN_HEIGHT:Number;
		public static var CUID:String="TMH";
		public static var CURRENT_CAT:Object=null;
		public static var REG_PHONE_NUMBER:String="UNREG";

		/**
		 * Danh sách sticky theo cat
		 * STICKIES[CAT ID] = STICKY POST OF CAT BY CAT ID
		 */
		public static var STICKIES_DIC:Dictionary;

		/**
		 * Danh sách stickies
		 */
		public static var STICKIES_DV:Array;
		
		public static var SYSTEM_PROPERTIES:String;

		public static function initStaticData():void
		{
			if (!inited)
			{
				inited=true;

				IMAGE_CACHED=new ContentCache();
				//IMAGE_CACHED.maxCacheEntries=363;
				CATEGORIES_PAGE=new Dictionary;
				STICKIES_DIC=new Dictionary;
			}
		}
	}
}
